package com.yjd.comm.spread.service;

import java.util.Map;

import com.yjd.comm.base.enums.DbWREnums;
import com.yjd.comm.base.model.PagerModel;
import com.yjd.comm.base.service.IBaseService;
import com.yjd.comm.spread.model.SpreadRelationModel;

/**
 * <b>description</b>：人人推广关系表业务接口<br>
 * <b>time</b>：2015-10-09 15:01:09 <br>
 * <b>author</b>：  SongJian
 */
public interface ISpreadRelationService extends IBaseService {
	/**
	 * 插入
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public SpreadRelationModel insert(SpreadRelationModel model) throws Exception;

	/**
	 * 更新,大于等于1表示成功，其他失败
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public int update(SpreadRelationModel model) throws Exception;

	/**
	 * 根据id删除,大于等于1表示成功，其他失败
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int delete(Long id) throws Exception;
	
	/**
	 * 查看未关联分页信息
	 * @param paramMap
	 * @return
	 * @throws Exception
	 */
	public PagerModel getSpreadUnknowInfoPage(Map paramMap,DbWREnums d) throws Exception ;
	
	/**
	 * 
	 * @param spreader yjd_spreader表的id
	 * @param ids      yjd_spread_relation 表的id 
	 * @return
	 * @throws Exception
	 */
	public int bindUser(Long spreader,String[]ids) throws Exception ;
	/**
	 * 
	 * @param ids yjd_spread_relation 表的id 
	 * @return
	 * @throws Exception
	 */
	public int destroy(String[]ids) throws Exception ;
	/*
	 * 关联关系分页
	 */
	public PagerModel getRelationMaplPage(Map paramMap,DbWREnums d) throws Exception;
}
